/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-10-03     FuLei       the first version
 */
#ifndef MCU_HW_MYGPIO_H_
#define MCU_HW_MYGPIO_H_


#define PA1    GET_PIN(A,1)


typedef struct _KeyDataFrm
{
    rt_uint8_t  up;
    rt_uint8_t  down;    //  0：停止， 1：上升， 2：下降
    rt_uint8_t  set;       // 故障码
    rt_uint8_t  menu;       //
    rt_uint8_t  SwitchFlag;
    rt_uint8_t  upFlag;
    rt_uint8_t  downFlag;
    rt_uint8_t  setFlag;
}KeyDataFrm;

void GPIO_LED_Init(void);
void LED_Flash(void);
void GPIO_KEY_Init(void);
void GPIO_KEY_Scan(KeyDataFrm *pKey);
//伺服电机使能引脚 PB12
void Motor_Init_Enable(void);
//伺服电机失能引脚 PB13
void Motor_Init_Disable(void);
//光电传感器初始化
void PhotoElectricity_Init(void);
//急停初始化
void EmergencyStop(void);
#endif /* MCU_HW_MYGPIO_H_ */
